home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
apidev
/
shotbl.arc
/
SCREEN.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-11-18
|
2KB
|
173 lines
;*****************************************************************************
;*
;* Program Name: SCREEN/CURSOR CONTROL ROUTINES
;*
;* Filename: screen.asm
;*
;* Date Created: November 18, 1988
;*
;* Version: 1.0
;*
;* Programmers: Thomas Brough
;*
;* Files used:
;*
;* Date Modified:
;*
;* Modifications:
;*
;* Comments:
;*
;*****************************************************************************
DGroup GROUP _DATA
_DATA segment word public 'DATA'
assume ds:DGroup
_DATA ends
PGroup GROUP _TEXT
assume cs:PGroup
_TEXT segment public 'CODE'
public _ClearScreen
public _ColorScreen
public _SetCursorPosition
public _GetCursorPosition
; ColorScreen( unsigned int attr);
;
; Input: None.
;
; Output: None.
;
; Comments:
; This routine clears the screen.
_ColorScreen proc near
push bp
mov bp, sp
push ax
push bx
push cx
push dx
xor ax, ax
mov ax, [bp + 4]
mov bh, al
xor al, al
xor cx, cx
mov dh, 23
mov dl, 79
mov ah, 7
int 10h
pop dx
pop cx
pop bx
pop ax
pop bp
ret
_ColorScreen endp
;
; ClearScreen();
;
; Input: None.
;
; Output: None.
;
; Comments:
; This routine clears the screen.
_ClearScreen proc near
push bp
mov bp, sp
push ax
push bx
push cx
push dx
xor al, al
xor cx, cx
mov dh, 24
mov dl, 79
mov ah, 7
mov bh, 7
int 10h
xor dx, dx
xor bh, bh
mov ah, 2
int 10h
pop dx
pop cx
pop bx
pop ax
pop bp
ret
_ClearScreen endp
;* SetCursorPosition( row, column )
;*
;* Input: int row, column;
;*
_SetCursorPosition proc near
push bp
mov bp, sp
push ax
push bx
push cx
push dx
mov dh, [bp+4];
mov dl, [bp+6];
xor bh, bh
mov ah, 2
int 10h
pop dx
pop cx
pop bx
pop ax
pop bp
ret
_SetCursorPosition endp
;* GetCursorPosition( row, col )
;*
;* Input: int *row, *col;
_GetCursorPosition proc near
push bp
mov bp, sp
push ax
push bx
push cx
push dx
mov ah, 03
xor bx, bx
int 10h
mov si, [bp + 4]
xor cx, cx
mov cl, dh
mov word ptr [si], cx
mov si, [bp+6]
xor cx, cx
mov cl, dl
mov word ptr [si], cx
pop dx
pop cx
pop bx
pop ax
pop bp
ret
_GetCursorPosition endp
_TEXT ends
END